package vn.smartoffice.core;

import java.util.Properties;
import java.util.ResourceBundle;

import org.apache.velocity.texen.util.PropertiesUtil;

public final class ConfigurationUtil {

	public static final String DEV = "DEV";
	public static final String PRODUCTION = "PRODUCTION";

	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle("smartoffice");

	private ConfigurationUtil() {

	}

	public static boolean isDev() {
		return DEV.endsWith(RESOURCE_BUNDLE.getString("application.mode"));
	}

	public static boolean isProduction() {
		return PRODUCTION.endsWith(RESOURCE_BUNDLE.getString("application.mode"));
	}

	public static Properties load(String fileName) {
		return new PropertiesUtil().load(fileName);
	}
}
